import Vue from 'vue';
import VueRouter from 'vue-router';

Vue.use(VueRouter);

const routes = [
    {
        path: '/foo',
        component: () =>
            import(/* webpackChunkName: "shop" */ '../views/Foo.vue'),
        meta: {
            index: 1,
        },
    },
    {
        path: '/bar',
        component: () =>
            import(/* webpackChunkName: "shop" */ '../views/Bar.vue'),
        meta: {
            index: 2,
        },
    },
];

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes,
});

export default router;
